import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutterapp/fileUpload/nextPage.dart';

class Next extends StatelessWidget {

  final File image;
  Next({this.image});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('证件采集系统'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: <Widget>[
              Column(
                children: <Widget>[
                  Container(
                    width: 200,
                    child: Image.file(this.image),
                    height: 200,
                  ),
                  Container(
                    margin: EdgeInsets.fromLTRB(0, 20, 0, 0),
                    child: Text('您的照片已通过审核，请点击下一步继续办理',
                      style: TextStyle(
                        fontSize: 18,
                      ),
                    ),
                  ),
                ],
              ),

              Container(
                width: 300,
                child: FlatButton(
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(100),
                  ),
                  child: Text('下一步',style: TextStyle(color: Colors.white),),
                  color: Colors.blueAccent,
                  onPressed: (){
                    Navigator.of(context).push(
                      MaterialPageRoute(
                        builder: (context)=>NextPage(),
                      )
                    );
                  },
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}

